package com.xbongbong.paas.print.pojo;

import com.xbongbong.paas.field.ItemPoJo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * 展示字段
 * @author zheng.li
 */
@Setter
@Getter
@ToString
public class FieldAttrPojo implements Serializable {

    /**
     * 字段
     */
    private String attr;
    /**
     * 字段名称
     */
    private String attrName;
    /**
     * 字段类型
     */
    private Integer fieldType;
    /**
     * saas中对应字段
     */
    private String saasAttr;
    /**
     * 用于二级表头
     */
    private List<? extends FieldAttrPojo> secondFields;
    /**
     * 选项值
     */
    private List<ItemPoJo> items;

    public FieldAttrPojo() {}

    public FieldAttrPojo(String attr, String attrName, String saasAttr) {
        this.attr = attr;
        this.attrName = attrName;
        this.saasAttr = saasAttr;
    }

    public FieldAttrPojo(String attr, String attrName, String saasAttr, Integer fieldType) {
        this.attr = attr;
        this.attrName = attrName;
        this.saasAttr = saasAttr;
        this.fieldType = fieldType;
    }
}
